using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Core_HGUI_TextProperty_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Core.HGUI.TextProperty);

            field = type.GetField("Bold", flag);
            app.RegisterCLRFieldGetter(field, get_Bold_0);
            app.RegisterCLRFieldSetter(field, set_Bold_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_Bold_0, AssignFromStack_Bold_0);
            field = type.GetField("Italic", flag);
            app.RegisterCLRFieldGetter(field, get_Italic_1);
            app.RegisterCLRFieldSetter(field, set_Italic_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Italic_1, AssignFromStack_Italic_1);
            field = type.GetField("ReSize", flag);
            app.RegisterCLRFieldGetter(field, get_ReSize_2);
            app.RegisterCLRFieldSetter(field, set_ReSize_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_ReSize_2, AssignFromStack_ReSize_2);
            field = type.GetField("Size", flag);
            app.RegisterCLRFieldGetter(field, get_Size_3);
            app.RegisterCLRFieldSetter(field, set_Size_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Size_3, AssignFromStack_Size_3);
            field = type.GetField("ReColor", flag);
            app.RegisterCLRFieldGetter(field, get_ReColor_4);
            app.RegisterCLRFieldSetter(field, set_ReColor_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_ReColor_4, AssignFromStack_ReColor_4);
            field = type.GetField("color", flag);
            app.RegisterCLRFieldGetter(field, get_color_5);
            app.RegisterCLRFieldSetter(field, set_color_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_color_5, AssignFromStack_color_5);
            field = type.GetField("Http", flag);
            app.RegisterCLRFieldGetter(field, get_Http_6);
            app.RegisterCLRFieldSetter(field, set_Http_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_Http_6, AssignFromStack_Http_6);
            field = type.GetField("Content", flag);
            app.RegisterCLRFieldGetter(field, get_Content_7);
            app.RegisterCLRFieldSetter(field, set_Content_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_Content_7, AssignFromStack_Content_7);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Core.HGUI.TextProperty());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Core.HGUI.TextProperty[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_Bold_0(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).Bold;
        }

        static StackObject* CopyToStack_Bold_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).Bold;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_Bold_0(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).Bold = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_Bold_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @Bold = ptr_of_this_method->Value == 1;
            ((huqiang.Core.HGUI.TextProperty)o).Bold = @Bold;
            return ptr_of_this_method;
        }

        static object get_Italic_1(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).Italic;
        }

        static StackObject* CopyToStack_Italic_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).Italic;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_Italic_1(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).Italic = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_Italic_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @Italic = ptr_of_this_method->Value == 1;
            ((huqiang.Core.HGUI.TextProperty)o).Italic = @Italic;
            return ptr_of_this_method;
        }

        static object get_ReSize_2(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).ReSize;
        }

        static StackObject* CopyToStack_ReSize_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).ReSize;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_ReSize_2(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).ReSize = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_ReSize_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @ReSize = ptr_of_this_method->Value == 1;
            ((huqiang.Core.HGUI.TextProperty)o).ReSize = @ReSize;
            return ptr_of_this_method;
        }

        static object get_Size_3(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).Size;
        }

        static StackObject* CopyToStack_Size_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).Size;
            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_Size_3(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).Size = (System.Single)v;
        }

        static StackObject* AssignFromStack_Size_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Single @Size = *(float*)&ptr_of_this_method->Value;
            ((huqiang.Core.HGUI.TextProperty)o).Size = @Size;
            return ptr_of_this_method;
        }

        static object get_ReColor_4(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).ReColor;
        }

        static StackObject* CopyToStack_ReColor_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).ReColor;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_ReColor_4(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).ReColor = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_ReColor_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @ReColor = ptr_of_this_method->Value == 1;
            ((huqiang.Core.HGUI.TextProperty)o).ReColor = @ReColor;
            return ptr_of_this_method;
        }

        static object get_color_5(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).color;
        }

        static StackObject* CopyToStack_color_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).color;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_color_5(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).color = (UnityEngine.Color32)v;
        }

        static StackObject* AssignFromStack_color_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            UnityEngine.Color32 @color = (UnityEngine.Color32)typeof(UnityEngine.Color32).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)16);
            ((huqiang.Core.HGUI.TextProperty)o).color = @color;
            return ptr_of_this_method;
        }

        static object get_Http_6(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).Http;
        }

        static StackObject* CopyToStack_Http_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).Http;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_Http_6(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).Http = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_Http_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @Http = ptr_of_this_method->Value == 1;
            ((huqiang.Core.HGUI.TextProperty)o).Http = @Http;
            return ptr_of_this_method;
        }

        static object get_Content_7(ref object o)
        {
            return ((huqiang.Core.HGUI.TextProperty)o).Content;
        }

        static StackObject* CopyToStack_Content_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Core.HGUI.TextProperty)o).Content;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Content_7(ref object o, object v)
        {
            ((huqiang.Core.HGUI.TextProperty)o).Content = (System.String)v;
        }

        static StackObject* AssignFromStack_Content_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @Content = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Core.HGUI.TextProperty)o).Content = @Content;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Core.HGUI.TextProperty();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
